package com.health.tablebean;

import java.util.Date;

import android.text.TextUtils;
import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Table;

/**
 * @author Administrator 健康体检_非免疫规划预防接种史表
 *
 */
@Table(name = "ARCHIVE_INOCULATIONHISTORY")
public class ARCHIVE_INOCULATIONHISTORY {
	/** 接种日期 */
	private Date INOCULATIONDATE;
	/** 接种机构 */
	private String INOCULATIONHISTORY;
	/** 体检编号FK（与ARCHIVE_CUSTOMERBASEINFO体检编号关联） */
	private String PHYSICALID;
	/** 药物名称 */
	private String PILLNAME;
	/** 编号主键标识 */
	@Id(column = "ID")
	private int ID;

	private String IDCARD;
	private String NGUID;

	public Date getINOCULATIONDATE() {
		return INOCULATIONDATE;
	}

	public void setINOCULATIONDATE(Date iNOCULATIONDATE) {
		INOCULATIONDATE = iNOCULATIONDATE;
	}

	public String getIDCARD() {
		return IDCARD;
	}

	public void setIDCARD(String iDCARD) {
		IDCARD = iDCARD;
	}

	public String getNGUID() {
		return NGUID;
	}

	public void setNGUID(String nGUID) {
		NGUID = nGUID;
	}

	public String getINOCULATIONHISTORY() {
		return INOCULATIONHISTORY;
	}

	public void setINOCULATIONHISTORY(String iNOCULATIONHISTORY) {
		INOCULATIONHISTORY = iNOCULATIONHISTORY;
	}

	public String getPHYSICALID() {
		return PHYSICALID;
	}

	public void setPHYSICALID(String pHYSICALID) {
		PHYSICALID = pHYSICALID;
	}

	public String getPILLNAME() {
		return PILLNAME;
	}

	public void setPILLNAME(String pILLNAME) {
		PILLNAME = pILLNAME;
	}

	public int getID() {
		return ID;
	}

	public void setID(int iD) {
		ID = iD;
	}

	@Override
	public boolean equals(Object o) {
		if (!(o instanceof ARCHIVE_INOCULATIONHISTORY)) {
			return false;
		}
		ARCHIVE_INOCULATIONHISTORY obj = (ARCHIVE_INOCULATIONHISTORY) o;

		if (notNull(getIDCARD()).equals(notNull(obj.getIDCARD()))
				&& notNull(getINOCULATIONDATE()).equals(notNull(obj.getINOCULATIONDATE()))
				&& notNull(getINOCULATIONHISTORY()).equals(notNull(obj.getINOCULATIONHISTORY()))
				&& notNull(getPHYSICALID()).equals(notNull(obj.getPHYSICALID()))
				&& notNull(getPILLNAME()).equals(notNull(obj.getPILLNAME()))) {
			return true;
		}

		return false;
	}

	private String notNull(String str) {
		if (TextUtils.isEmpty(str)) {
			return "";
		}
		return str;
	}

	private String notNull(int str) {
		if (str == 0) {
			return "0";
		}
		return String.valueOf(str);
	}

	private Date notNull(Date date) {
		if (date == null) {
			return new Date();
		}
		return date;
	}

}
